﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ScreenTester.Properties;
using System.IO;

namespace ScreenTester
{
    public class ScreenTestEntry
    {
        public static void BeginTest(int interval
            , string testcasesFolder)
        {
            if (!Directory.Exists(testcasesFolder))
            {
                Console.WriteLine("The folder '{0}' does not exist", testcasesFolder);
                return;
            }

            string[] files = Directory.GetFiles(testcasesFolder, "*.scrntst");
            foreach (string filename in files)
            {
                try
                {
                    SimulationOperationExecuter executer = new SimulationOperationExecuter(filename, interval);
                    executer.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
        }
    }
}
